#!/bin/bash
#bee run -c config.json

case $1 in
	start)
		nohup ./crawl_toutiao 2>&1 >>info.log /dev/null &
		echo "服务已经启动..."
		sleep 1
	;;
	stop)
		killall crawl_toutiao
		echo "服务已经停止..."
		sleep 1
	;;	
	restart)
		killall crawl_toutiao
		sleep 1
		nohup ./crawl_toutiao 2>&1 >>info.log /dev/null &
		echo "服务已经启动..."
		sleep 1
	;;
	*)
		echo "$0{start|stop|restart}"
		exit 4
	;;
esac	

